<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            font-family: "华文楷体";
        }
        body{
            text-align: center;
            margin: 0 atuo;
            background-color: bisque;
        }
        .title{
            color: skyblue;
        }
        img{
            width: 150px;
            height: 150px;
        }
        .head{
            margin: 0 auto;
            border:2px solid darkblue ;
            width: 400px;
            height: 30px;
            border-radius: 20px;
            overflow: hidden;
        }
        .input,.submit{
            display: inline;
            outline: none;
            margin: 0;
            border: 0;
            padding: 0px;
        }
        .input{
            float: left;
            height: 30px;
            width: 325px;
            border-radius: 20px;
            font-size: 24px;
            padding-left: 15px;
            padding-right: 60px;
        }
        .submit{
            position: relative;
            bottom: 30px;
            background:skyblue;
            border-radius: 20px;
            float: right;
            width: 50px;
            height: 30px;
            font-size: 21px;
            color:black;
        }
        .city{
            font-size: 18px;
            text-decoration: none;
            color: darkgray;
            margin-left: 30px;
            margin-right: 30px;
        }
        .content{
            margin: 0 auto;
            width: 750px;
        }
        .weather{
            list-style: none;
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
        }
        .days{         
            width: 18%;   
            margin: 0 auto;
        }
        .weather .days:not(:last-child){
            border-right:1px solid darkgray;
        }
        .day_title{
            text-align: center;
            color: orange;
            font-size: 24px;
        }
    </style>
</head>
<body>
    <div id="wrap">
    <h1 class="title">天气预报鹅</h1>
    <img src="img/goose.gif" alt="">
    <div class="head">
        <input type="text" class="input" placeholder="请输入要查询的城市...." v-model="city" @keyup.enter="searchWeather">
    <button type="submit" class="submit" @click="searchWeather">搜索</button>
    </div>
    <div>
        <a href="#" class="city" @click="changeCity('深圳')">深圳</a>
        <a href="#" class="city" @click="changeCity('广州')">广州</a>
        <a href="#" class="city" @click="changeCity('北京')">北京</a>
        <a href="#" class="city" @click="changeCity('上海')">上海</a>
    </div>
    <div class="content">
    <ul class="weather">
        <li class="days" v-for="item in weatherList">
            <div class="day_title">
            {{item.type}}
            </div>
            {{item.date}}<br>
            {{item.high}}
        </li>
    </ul>
</div>
    </div>
    <!-- 官网提供的 axios 在线地址 -->
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script src="main.js"></script>
</body>
</html>